<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->


<!DOCTYPE html
  PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
   
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="DC.Type" content="topic">
<meta name="DC.Title" content="Enabling or Disabling the Log Backup Function in the Production Environment">
<meta name="product" content="">
<meta name="DC.Relation" scheme="URI" content="en-us_topic_0000002164664398.html">
<meta name="prodname" content="">
<meta name="version" content="">
<meta name="brand" content="">
<meta name="DC.Publisher" content="20250306">
<meta name="prodname" content="csbs">
<meta name="documenttype" content="usermanual">
<meta name="DC.Format" content="XHTML">
<meta name="DC.Identifier" content="EN-US_TOPIC_0000002164664374">
<meta name="DC.Language" content="en-us">
<link rel="stylesheet" type="text/css" href="public_sys-resources/commonltr.css">
<title>Enabling or Disabling the Log Backup Function in the Production Environment</title>
</head>
<body style="clear:both; padding-left:10px; padding-top:5px; padding-right:5px; padding-bottom:5px"><a name="EN-US_TOPIC_0000002164664374"></a><a name="EN-US_TOPIC_0000002164664374"></a>

<h1 class="topictitle1">Enabling or Disabling the Log Backup Function in the Production Environment</h1>
<div><div class="section"><h4 class="sectiontitle">Procedure</h4><ol><li><span>Log in to the TiUP node.</span></li><li><span>Run the following command to enable or disable the log backup function (<strong>172.0.0.0:80</strong> indicates the IP address and port number of the PD node, and <strong>local:///test/bkpbinlog0000/</strong> indicates the absolute path of the directory for storing log backup files. Enter the values based on the site requirements).</span><p><div class="note"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul><li>Ensure that the TiDB cluster has the read and write permissions on the directories for storing log backup files on the TiUP and TiKV nodes (TiFlash nodes will be included as well, if they exist in the TiDB cluster).</li><li>Before the log backup function is enabled, ensure that the absolute paths of the directories for storing log backup files on the TiUP and TiKV nodes are the same and the directories are empty (If TiFlash nodes exist in the TiDB cluster, the absolute paths of the directories for storing log backup files on the TiFlash nodes must be the same as well).</li></ul>
</div></div>
<ul><li>Enable the log backup function.<pre class="screen">tiup br log start --task-name=pitr --pd <em>172.0.0.0:80</em> --storage <em>"local:///</em><em>test/bkpbinlog0000</em><em>/"</em></pre>
</li><li>Disable the log backup function.<pre class="screen">tiup br log stop --task-name=pitr --pd <em>172.0.0.0:80</em> </pre>
</li></ul>
</p></li><li><span>Run the following command to query the status of the log backup function (<strong>172.0.0.0:80</strong> indicates the IP address and port number of the PD node):</span><p><pre class="screen">tiup br log status --task-name=pitr --pd <em>172.0.0.0:80</em> </pre>
<ul><li>If <strong>NORMAL</strong> is displayed in the command output, the function is enabled.</li><li>If <span class="uicontrol"><b>task not found</b></span> is displayed in the command output, the function is disabled.</li></ul>
</p></li></ol>
</div>
<p></p>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0000002164664398.html">FAQs</a></div>
</div>
</div>

<div class="hrcopyright"><hr size="2"></div><div class="hwcopyright">Copyright &copy; Huawei Technologies Co., Ltd.</div></body>
</html>